package com.ban.springcloud.controller;

import com.ban.springcloud.bean.CommonResult;
import com.ban.springcloud.bean.Payment;
import com.ban.springcloud.feign.PaymentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Ban
 * @version 1.0
 * Create by 2022/1/15 15:34
 */
@RestController
@Slf4j
public class OrderFeignController {
    @Autowired
    PaymentService paymentService;

    @GetMapping("/consumer/payment/get/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id){
        return paymentService.getPaymentById(id);
    }
}
